<template>
  <div>
    <div class="dashboard-editor-container">
      <!--      <div class="top_link" v-if="hasComId">
                 <a :href="pcLink" target="_blank">PC学习端入口  {{pcLink}}</a>
                 <br>
                 <a :href="h5Link" target="_blank">H5学习端入口  {{h5Link}}</a>
                 <br>
              <a :href="daH5Link" target="_blank">学员档案录入 {{daH5Link}}</a>
              <a :href="wuliuInfo" target="_blank">物流信息 {{wuliuInfo}}</a>
            </div>-->
      <panel-group/>
      <div class="index-card-bottom">
        <div class="index-card-in">
          <div class="say-hi-text">
            <p class="title-name">
              你好，{{myName}}！
            </p>
            <p class="title-hello">
              欢迎使用{{sysName}}后台
            </p>
          </div>
          <div class="call-center"></div>
          <div class="say-hi"></div>

        </div>


      </div>

    </div>
  </div>

</template>

<script>
import PanelGroup from './dashboard/PanelGroup'
let sysName = "顶呱呱电玩"


export default {
  name: 'Index',
  components: {PanelGroup},
  data() {
    return {
      record: {},
      sysName:sysName,
    }
  },

  computed: {
    myName() {
      return this.$store.state.user.name
    },
    hasComId(){

      return !!this.$store.state.user.comId
    },
    pcLink() {
      return 'https://pc.xd6.cn/' + this.$store.state.user.comId + '/login'
    },
    h5Link() {
      return 'https://h5.xd6.cn/home/' + this.$store.state.user.comId
    },
    daH5Link() {
      //帮考自营的直接显示
      if(this.$store.state.user.comId == "4664858152")
        return 'http://h5.xd6.cn/dj';
      return 'https://h5.xd6.cn/' + this.$store.state.user.comId + '/dj'
    },
    wuliuInfo() {
      //帮考自营的直接显示
      if(this.$store.state.user.comId == "4664858152")
        return 'https://h5.xd6.cn/logistics';
      return 'https://h5.xd6.cn/' + this.$store.state.user.comId + '/logistics'
    },

  },
  methods: {}
}
</script>

<style lang="scss" scoped>
.dashboard-editor-container {
  padding: 16px;
  background-color: rgb(240, 242, 245);
  position: relative;

  .chart-wrapper {
    background: #fff;
    padding: 16px 16px 0;
    margin-bottom: 32px;
  }


}

.index-card-bottom {
  margin-top: 16px;

  background: #fff;
  border-radius: 8px;
  padding: 16px;

  .index-card-in {
    overflow: hidden;
    position: relative;
    height: 500px;
    background: #E6EFFE;
    border-radius: 8px;

    .say-hi-text {
      z-index: 3;
      position: absolute;
      left: 36px;
      font-family: Source Han Sans CN-Medium, Source Han Sans CN;
      color: #0256FF;

      .title-name {
        font-weight: 700;
        font-size: 44px;
      }

      .title-hello {
        font-size: 24px;
      }
    }


    .call-center {
      z-index: 2;
      background: url("../../public/static/image/index/callCenter.png");
      -webkit-background-size: cover;
      background-size: cover;
      width: 700px;
      height: 480px;
      position: absolute;
      right: 0;
    }

    .say-hi {
      z-index: 1;
      background: url("../../public/static/image/index/hi.png");
      -webkit-background-size: cover;
      background-size: cover;
      width: 200px;
      height: 200px;
      position: absolute;
      left: 10%;
      bottom: 10%;
    }
  }

}


@media (max-width: 1024px) {
  .chart-wrapper {
    padding: 8px;
  }
}


.top_link {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom:16px;
  a {
    line-height: 36px;
    height: 36px;
    color: #1890ff;
  }
}

</style>
